using System;
using System.Collections.Generic;
using System.Text;

namespace Adoor.Mapping.Attributes
{
    [Serializable, AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
    public class KeyAttribute : BaseAttribute
    {
        // Methods
        public KeyAttribute():base(0)
        {
        }

        public KeyAttribute(int position):base(position) 
        {
        }

        // Properties
        public Type ProviderClass
        {
            get { return providerClass; }
            set { providerClass = value; }
        }

        public string PrimaryKey
        {
            get { return primaryKey; }
            set { primaryKey = value; }
        }

        public string SqlStatement
        {
            get { return sqlStatement; }
            set { sqlStatement = value; }
        }

        // Fields
        private Type providerClass = Type.GetType("Adoor.Object.Relational.SmartKeyFactory, Adoor.Object.Relational");//typeof(global::Adoor.Object.Relational.SmartKeyFactory);        
        private string primaryKey;
        private string sqlStatement;

        public override void AcceptVisitor(IVisitor visitor, System.Reflection.MemberInfo member)
        {
            visitor.Visit(this,member);
        }
    }

}
